package com.link.gateway.base.login.controller;


import com.link.gateway.base.login.model.RespDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;



/**
 * @author unknown
 * @date unknown
 * @comments 登录
 */
@Controller
@RequestMapping("/base/user")
public class LoginController {

    /**
     * crm 登录入口
     *
     * @param username
     * @param password
     * @param request
     * @return RespDTO
     * @throws Exception
     */
    @RequestMapping(method = {RequestMethod.POST, RequestMethod.GET}, value = "/login")
    public RespDTO login() throws Exception {
        try {
            RespDTO dto = new RespDTO();
            return dto;
        } catch (Exception e) {
            RespDTO respDTO = new RespDTO();
            respDTO.setError(e.getMessage());
            respDTO.setCode(-1);
            return respDTO;
        }
    }
}
